package com.niiwoo.activity.stage.enums.prize;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description
 * @Author zq
 * @Date 2017/11/30
 */
@Getter
@AllArgsConstructor
public enum UserPrizeActionTypeIdEnum {

    // 红包动作来源类型
    REAL_NAME_VERIFICATION((byte) 1, "实名验证", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    GUARANTOR_AUTHENTICATION((byte) 2, "担保人身份验证", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    BIND_BANK_CARD((byte) 3, "绑定银行卡", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    FIRST_GUARANTEE((byte) 4, "首次担保", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    FIRST_INVEST((byte) 5, "首次投资", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    BACKGROUND_TO_SEND((byte) 6, "后台发送", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    INVITATION_TO_REGISTER((byte) 7, "邀请注册", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    SWEEP_CODE_REGISTE((byte) 8, "扫码注册", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    TUANDAI_GUARANTEE((byte) 9, "团贷网迁移担保红包", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    TUANDAI_INVEST((byte) 10, "团贷迁移投资红包", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    GUARANTEED_EXPERIENCE_VOUCHER((byte) 11, "抽奖活动-担保体验券", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    INVEST_EXPERIENCE_VOUCHER((byte) 12, "抽奖活动-投资体验券", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    INVEST_KIMS_VOUCHER((byte) 13, "抽奖活动-投资代金劵", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    GUARANTEE_KIMS_VOUCHER((byte) 14, "抽奖活动-担保代金劵", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    GUARANTEE_INVEST_KIMS_VOUCHER((byte) 15, "抽奖活动-担保投资代金券", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    TUANDAI_WITHDRAWAL_KIMS_VOUCHER((byte) 16, "团贷网首次登录-提现代金券", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    TUANDAI_MYSTERY_PACKAGE((byte) 17, "团贷网首次登陆-神秘大礼包", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    ACTIVITY_201511((byte) 18, "2015年十一活动", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    ACTIVITY_NOVICE_GIFT_BAG((byte) 19, "活动期间新用户注册赠送新手礼包", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    QQJ_ACTIVITY((byte) 20, "悄悄借活动", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    WITHDRAWAL_KIMS_VOUCHER((byte) 21, "提现代金劵", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    SIGN_GIFT_ACTIVITY((byte) 22, "签到送礼活动", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    MONKEY_SPRING_FESTIVAL_ACTIVITY((byte) 23, "猴年春节点赞活动", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    ROUTINE_ACTIVITY((byte) 24, "常规活动", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    SYSTEM_REPLACEMENT((byte) 25, "系统补发", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    REFINANCING((byte) 26, "借新还旧活动", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    CASH_ACTIVITY((byte) 27, "返现活动", UserPrizeExtendTypeEnum.DEFAULT.getExtendType()),
    INVITE_ACTIVITY_INVEST((byte) 28, "邀请好友活动2018-投资", UserPrizeExtendTypeEnum.RECOMMEND_INVESTED_BONUS.getExtendType()),
    INVITE_ACTIVITY_BORROW((byte) 29, "邀请好友活动2018-借款", UserPrizeExtendTypeEnum.RECOMMEND_LOAN_BONUS.getExtendType());

    private Byte type;
    private String description;
    private Byte extendType;

    public static UserPrizeActionTypeIdEnum getEnumByActionTypeId(Byte actionTypeId) {
        if (actionTypeId == null) {
            return ROUTINE_ACTIVITY;
        }
        for (UserPrizeActionTypeIdEnum actionTypeIdEnum : UserPrizeActionTypeIdEnum.values()) {
            if (actionTypeIdEnum.getType().equals(actionTypeId)) {
                return actionTypeIdEnum;
            }
        }
        return null;
    }
}
